import Vue from "vue"
import Vuex from "vuex"

Vue.use(Vuex);

// 引入小仓库
import layout from '@/store/layout'
import home from '@/store/home'
import category from "./category";
import detail from "./detail";
import user from "./user";
import cartstore from "./cartstore";
import checkout from "./checkout";
import pay from "./pay";

// 对外暴露一个Store类的实例
export default new Vuex.Store({
    // 实现Vuex模块化开发存储数据
    modules:{
        layout,
        home,
        category,
        detail,
        user,
        cartstore,
        checkout,
        pay
    }
})